﻿using Microsoft.EntityFrameworkCore;
using RSTAi.Platform.GrpcService.Models;

namespace RSTAi.Platform.GrpcService.Contexts
{
    public class MyDBContext : DbContext
    {
        private static ILoggerFactory ContextLoggerFactory
    => LoggerFactory.Create(b => b.AddConsole().AddFilter("", LogLevel.Information));
        #pragma warning disable CS8618
        public MyDBContext(DbContextOptions<MyDBContext> options) : base(options)
        {

        }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseLoggerFactory(ContextLoggerFactory);
        }
        public DbSet<SysSetting> SysSettings { set; get; }

        public DbSet<Product> Products { set; get; }

        public DbSet<ProductStep> ProductSteps { set; get; }


#pragma warning restore CS8618


    }


    





}
